<h1>Listing tracks</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Duration</th>
    <th>Record</th>
  </tr>

<% @tracks.each do |track| %>
  <tr>
    <td><%=h track.title %></td>
    <td><%=h track.duration %></td>
    <td><%=h track.record_id %></td>
    <td><%= link_to 'Show', track %></td>
    <td><%= link_to 'Edit', edit_track_path(track) %></td>
    <td><%= link_to 'Destroy', track, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New track', new_track_path %>